/*
* 输入框输入文字
* 多行
* 自动换行
* */
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:frametrim/utility/sq_color.dart';

class TextfieldTextLineFeed extends StatelessWidget {
  TextEditingController _controller;
  late String hintText;
  late int maxLength;
  late TextInputType mtextType;

  TextfieldTextLineFeed(this.hintText, this.maxLength, this._controller);

  @override
  Widget build(BuildContext context) {
    return TextField(
      maxLength: maxLength,
      maxLines: 200,
      //键盘样式
      keyboardType: TextInputType.text,
      // keyboardType: TextInputType.multiline,
      controller: _controller,
      style:  TextStyle(fontSize: 15, color: SQColor.black,height: 1.3),
      decoration: InputDecoration(
        // 去除输入框底部的字符计数,例如11/20
        // counterText: '',
        counterStyle: TextStyle(fontSize: 14,color: SQColor.color_666666),
        /*去掉下划线*/
        // border: InputBorder.none,
        //contentPadding+border 设置TextField垂直居中
        contentPadding: EdgeInsets.symmetric(vertical: 0),
        border: OutlineInputBorder(borderSide: BorderSide.none),

        hintText:hintText,
        hintStyle: TextStyle(fontSize: 15, color: SQColor.color_959595),
        labelStyle: TextStyle(fontSize: 15, color: SQColor.black),

      ),
    );
  }
}
